//
// Copyright (c) 2009 All Right Reserved
//
// vl
//
// 2009-01-01
// Contains ...
using System.Windows;
using System.Windows.Media;
namespace LargoPanels.Editor
{
/// A seed cell.
public class SeedCell
{
#region Constructors
///
/// Initializes a new instance of the class.
///
[JetBrains.Annotations.UsedImplicitlyAttribute]
public SeedCell() {
//// SeedSize.HighlightPenBrush = Brushes.DarkBlue;
this.HighlightPenBrush = Brushes.DarkRed;
}
#endregion
#region Properties - Coordinates
/// Gets or sets the left.
/// The left.
public double Left { get; set; }
/// Gets or sets the top.
/// The top.
public double Top { get; set; }
/// Gets or sets the height.
/// The height.
public double Height { get; set; }
/// Gets or sets the top.
/// The top.
public double Width { get; set; }
#endregion
#region Properties - Main raster
/// Gets or sets the zero-based index of the line.
/// The line index.
public int LineIndex { get; set; }
/// Gets or sets the zero-based index of the bar.
/// The bar index.
public int BarIndex { get; set; }
#endregion
#region Properties - Drawing
/// Gets or sets the rectangle.
/// The rectangle.
public Rect Rectangle { get; set; }
///
/// Gets or sets a value indicating whether this is highlighted.
///
/// true if highlighted; otherwise, false.
public bool IsHighlighted { get; set; }
#endregion
#region Properties - Brushes
/// Gets or sets the pen brush.
/// The pen brush.
public Brush PenBrush { get; set; }
/// Gets or sets the highlight pen brush.
/// The highlight pen brush.
public Brush HighlightPenBrush { get; set; }
/// Gets or sets the content brush.
/// The content brush.
public Brush ContentBrush { get; set; }
#endregion
#region Public methods - virtual
///
/// Copies this instance.
///
public virtual void Copy() {
}
///
/// Pastes this instance.
///
public virtual void Paste() {
}
#endregion
#region Public methods
/// Query if 'p' contains point.
/// A Point to process.
/// True if it succeeds, false if it fails.
public bool ContainsPoint(Point p) {
return this.Left <= p.X && this.Left + this.Width >= p.X && this.Top <= p.Y && this.Top + this.Height >= p.Y;
}
#endregion
}
}